<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<!-- Mirrored from www.wolfssl.com/wolfSSL/Blog/Entries/2015/4/16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:48:21 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><!-- /Added by HTTrack -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="Generator" content="iWeb 3.0.4"/>
<meta name="iWeb-Build" content="local-build-20150706"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>
<meta name="viewport" content="width=700"/>
<title>Intel&rsquo;s Extended Instructions Accelerates Hash Algorithms</title>
<link rel="stylesheet" type="text/css" media="screen,print" href="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms.css"/>
<!--[if lt IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/16_Intels_Extended_Instructions_Accelerates_Hash_AlgorithmsIE.css'/><![endif]-->
<!--[if gte IE 8]><link rel='stylesheet' type='text/css' media='screen,print' href='../../../../Media/IE8.css'/><![endif]-->
<script language="javascript" type="text/javascript">iWebBlogMainPageName='Blog.html';iWebBlogMainPageTitle='Blog';iWebBlogArchivePageName='Archive.html';iWebBlogArchivePageTitle='Archive';</script>
<script type="text/javascript" src="../../../../Scripts/iWebSite.js"></script>
<script type="text/javascript" src="../../../../Scripts/iWebImage.js"></script>
<script type="text/javascript" src="https://www.icloud.com/"></script>
<script type="text/javascript" src="../../../../Scripts/iWebBlog.js"></script>
<script type="text/javascript" src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms.js"></script>
 <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','../../../../../../www.google-analytics.com/analytics.js','ga');ga('create','UA-64826966-1','auto');ga('send','pageview');</script> <meta name="description" content="Curious about how new machine instructions can accelerate crypto algorithms? &nbsp;Most recently we added Intel&rsquo;s Advanced Vector Extensions (AVX1 and 2) to wolfSSL&rsquo;s secure hash algorithms."/><meta name="keywords" content="embedded ssl, lightweight ssl, iot ssl, iot security, ssl library, open source ssl, tls library, portable ssl, mysql ssl, cyassl, yassl"/><meta name="robots" content="follow,index"/></head>
<body style="background: rgb(255, 255, 255); margin: 0pt; " onload="onPageLoad();">
<div style="text-align: center; ">
<div style="margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; overflow: hidden; position: relative; word-wrap: break-word;  background: rgb(255, 255, 255); text-align: left; width: 700px; " id="body_content">
<div style="float: left; margin-left: 0px; position: relative; width: 700px; z-index: 0; " id="nav_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="clear: both; height: 0px; line-height: 0px; " class="spacer"> </div>
</div>
<div style="height: 133px; margin-left: 0px; position: relative; width: 700px; z-index: 10; " id="header_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="height: 37px; width: 545px;  height: 37px; left: 155px; position: absolute; top: 100px; width: 545px; z-index: 1; " class="tinyText shadow_0">
<div style="position: relative; width: 545px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_1.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 545px; "/>
</div>
</div>
<div id="id1" style="height: 25px; left: 164px; position: absolute; top: 104px; width: 43px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content style_External_43_25" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style"><a class="class1" title="../../../../Home.html" href="../../../../Home.html">Home</a></p>
</div>
</div>
</div>
<div id="id2" style="height: 28px; left: 327px; position: absolute; top: 104px; width: 74px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_74_28" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class2" title="../../../../Download.html" href="https://wolfssl.com/wolfSSL/download/downloadm.php">Download</a></p>
</div>
</div>
</div>
<div id="id3" style="height: 27px; left: 403px; position: absolute; top: 104px; width: 58px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_58_27" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class3" title="../../../../License.html" href="../../../../License.html">License</a></p>
</div>
</div>
</div>
<div id="id4" style="height: 29px; left: 463px; position: absolute; top: 104px; width: 44px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_44_29" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class4" title="../../../Blog.html" href="../../../Blog.html">Blog</a></p>
</div>
</div>
</div>
<div id="id5" style="height: 27px; left: 554px; position: absolute; top: 104px; width: 80px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_80_27" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class5" title="../../../../Community.html" href="../../../../Community.html">Community</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 209px; position: absolute; top: 101px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_2.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 260px; position: absolute; top: 100px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_3.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 327px; position: absolute; top: 101px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_4.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 402px; position: absolute; top: 101px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_5.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 462px; position: absolute; top: 100px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_6.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 553px; position: absolute; top: 100px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_7.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id6" style="height: 29px; left: 634px; position: absolute; top: 104px; width: 65px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_65_29" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class6" title="../../../../Contact.html" href="../../../../Contact.html">Contact</a></p>
</div>
</div>
</div>
<div id="id7" style="height: 26px; left: 209px; position: absolute; top: 104px; width: 52px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_52_26" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class7" title="../../../../About.html" href="../../../../About.html">About</a></p>
</div>
</div>
</div>
<div style="height: 36px; width: 1px;  height: 36px; left: 634px; position: absolute; top: 101px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_8.png" alt="" style="height: 36px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
<div id="id8" style="height: 25px; left: 261px; position: absolute; top: 104px; width: 65px; z-index: 1; " class="style_SkipStroke shape-with-text">
<div class="text-content style_External_65_25" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class8" title="../../../../Products.html" href="../../../../Products.html">Products</a></p>
</div>
</div>
</div>
<div id="id9" style="height: 25px; left: 510px; position: absolute; top: 104px; width: 44px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content style_External_44_25" style="padding: 0px; ">
<div class="style">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_1"><a class="class9" title="../../../../Docs.html" href="../../../../Docs.html">Docs</a></p>
</div>
</div>
</div>
<div style="height: 37px; width: 1px;  height: 37px; left: 509px; position: absolute; top: 100px; width: 0px; z-index: 1; " class="tinyText">
<div style="position: relative; width: 0px; ">
<img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/shapeimage_9.png" alt="" style="height: 37px; left: 0px; position: absolute; top: 0px; width: 1px; "/>
</div>
</div>
</div>
<div style="margin-left: 0px; position: relative; width: 700px; z-index: 5; " id="body_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
<div style="height: 121px; width: 155px;  height: 121px; left: -4px; position: absolute; top: -107px; width: 155px; z-index: 1; " class="tinyText style_SkipStroke_2">
<a href="../../../../Home.html" title="../../../../Home.html"><img src="16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms_files/wolfssl_logo.png" alt="" style="border: none; height: 121px; width: 156px; "/></a>
</div>
<div id="id10" style="visibility: hidden;  height: 32px; left: 17px; position: absolute; top: 75px; width: 682px; z-index: 1; " class="style_SkipStroke_3 shape-with-text">
<div class="text-content Normal_External_682_32" style="padding: 0px; ">
<div class="Normal">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_2">Intel’s Extended Instructions Accelerates Hash Algorithms</p>
</div>
</div>
<div id="generic-title-attributes" class="Title"></div>
</div>
<div style="height: 1px; line-height: 1px; " class="tinyText"> </div>
<div style="visibility: hidden;  margin-left: 17px; margin-top: 155px; position: relative; width: 681px; z-index: 1; " class="style_SkipStroke_4 shape-with-text flowDefining">
<div class="text-content style_External_681_498" style="padding: 0px; ">
<div class="style_1">
<p style="padding-top: 0pt; " class="paragraph_style_3">Curious about how new machine instructions can accelerate crypto algorithms?  Most recently we added Intel’s Advanced Vector Extensions (AVX1 and 2) to wolfSSL’s secure hash algorithms.  Benchmarks show it improves the performance of SHA-256, 384 and 512 up to 75% (See: figure below). <br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">Intel's AVX1/2 allows 128bit/256bit registers to perform multiple word operations with a single instruction in parallel.<br/></p>
<p class="paragraph_style_3">The hashes take advantage of the AVX register parallelism and functional stitching between AVX and conventional registers as well.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">How can you get it? Simply specify <span class="style_2">--enable-intelasm</span> during ./configure with our latest version. It checks the instruction availability at run time, and you get the maximum performance improvement on your machine.<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">For further detail visit our &quot;wolfSSL / wolfCrypt Benchmarks&quot; page (<a title="http://wolfssl.com/yaSSL/benchmarks-cyassl.html" href="http://wolfssl.com/yaSSL/benchmarks-cyassl.html">http://wolfssl.com/yaSSL/benchmarks-cyassl.html</a>).<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">---<br/></p>
<p class="paragraph_style_4">AVX1:1.8GHz, Intel Core i5<br/></p>
<p class="paragraph_style_4">AVX2: Intel Broadwell<br/></p>
<p class="paragraph_style_3">---<br/></p>
<p class="paragraph_style_3">AVX2:    SHA-256  50 megs took 0.320 seconds, 156.118 MB/s Cycles per byte =  9.75  = 47%<br/></p>
<p class="paragraph_style_3">AVX1:   SHA-256  50 megs took 0.272 seconds, 184.068 MB/s Cycles per byte = 11.89  = 39%<br/></p>
<p class="paragraph_style_3">Normal: SHA-256  50 megs took 0.376 seconds, 132.985 MB/s Cycles per byte = 16.46<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">AVX2:    SHA-384  50 megs took 0.226 seconds, 221.318 MB/s Cycles per byte =  6.88  = 42%<br/></p>
<p class="paragraph_style_3">AVX1:   SHA-384  50 megs took 0.192 seconds, 260.975 MB/s Cycles per byte =  8.39  = 9%<br/></p>
<p class="paragraph_style_3">Normal: SHA-384  50 megs took 0.209 seconds, 239.743 MB/s Cycles per byte =  9.13<br/></p>
<p class="paragraph_style_3"><br/></p>
<p class="paragraph_style_3">AVX2:    SHA-512  50 megs took 0.224 seconds, 223.120 MB/s Cycles per byte =  6.82  = 75%<br/></p>
<p class="paragraph_style_3">AVX1:   SHA-512  50 megs took 0.188 seconds, 266.126 MB/s Cycles per byte =  8.22  = 50%<br/></p>
<p class="paragraph_style_3">Normal: SHA-512  50 megs took 0.281 seconds, 177.997 MB/s Cycles per byte = 12.29<br/></p>
<p style="padding-bottom: 0pt; " class="paragraph_style_3">===</p>
</div>
</div>
<div id="generic-body-attributes" class="Body"></div>
</div>
<div id="id11" style="visibility: hidden;  height: 24px; left: 18px; position: absolute; top: 121px; width: 681px; z-index: 1; " class="style_SkipStroke_5 shape-with-text">
<div class="text-content style_External_681_24" style="padding: 0px; ">
<div class="style_1">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="paragraph_style_5">Thursday, April 16, 2015</p>
</div>
</div>
<div id="generic-datefield-attributes" class="Date"></div>
</div>
<div id="id12" style="height: 30px; left: 380px; position: absolute; top: 677px; width: 315px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_315_30" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="Next"><a class="iWebBlogNext" title="" href="#">next &gt;</a></p>
</div>
</div>
</div>
<div id="id13" style="height: 30px; left: 18px; position: absolute; top: 677px; width: 315px; z-index: 1; " class="style_SkipStroke_1 shape-with-text">
<div class="text-content graphic_textbox_layout_style_default_External_315_30" style="padding: 0px; ">
<div class="graphic_textbox_layout_style_default">
<p style="padding-bottom: 0pt; padding-top: 0pt; " class="Previous"><a class="iWebBlogPrev" title="" href="#">&lt; previous</a></p>
</div>
</div>
</div>
<div style="height: 53px; line-height: 53px; " class="spacer"> </div>
</div>
<div style="height: 150px; margin-left: 0px; position: relative; width: 700px; z-index: 15; " id="footer_layer">
<div style="height: 0px; line-height: 0px; " class="bumper"> </div>
</div>
</div>
</div>
 </body>

<!-- Mirrored from www.wolfssl.com/wolfSSL/Blog/Entries/2015/4/16_Intels_Extended_Instructions_Accelerates_Hash_Algorithms.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 17 Jan 2017 13:48:35 GMT -->
</html>
